package top.lvkun.pay.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.lvkun.order.domain.OrderAddress;
import top.lvkun.order.mapper.OrderAddressMapper;

@RestController
@RequestMapping("/front")
public class FrontController {
    @Autowired
    private OrderAddressMapper orderAddressMapper;

    /**
     * 通过orderSn查询订单地址信息
     * @param orderSn
     * @return
     */
    @GetMapping("/orderAddress/{orderSn}")
    public OrderAddress findOrderAddressByOrderSn(@PathVariable("orderSn")String orderSn){
        return orderAddressMapper.findOrderAddressByOrderSn(orderSn);
    }
}
